IBM Support

PM53011: Build path dependency errors in Top Down JAX-WS generated web service with @XmlSeeAlso using option: Generate Schema Library

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Abstract:
    
    Build Path errors in a top down JAX-WS generated web service
    using option Generate Schema Library in Rational Application
    Developer v8.0.3 targeting a WebSphere Application Server
    v7.0.0.x. Generating a JAX-WS web service from a WSDL with the
    options 'Generate serializeable JAXB Classes' and 'Generate
    Schema Library' results in build errors on imports statements in
    some of the generated Java code because of missing build path
    dependencies to some of the other generated Java schema library
    projects. There are no errors if the option 'Generate Schema
    Library' is not selected.
    
    Problem:
    
    This can be recreated as follows with a WSDL where an XSD base
    type is extended:
    
    - Right-click on the WSDL ? Web Services ? Generate Java Bean
    skeleton and select JAX-WS targeting WebSphere Application
    Server 7.0 and set the slider to Deploy
    - On the next page, WebSphere JAX-WS Top Down Web Services
    Configuration, select:
    Version of JAX-WS .... [2.1]
    [x] Generate serializeable JAXB classes
    [x] Generate Schema Library
    [x] Generate Web Services Deployment Descriptor
    
    - Click Finish
    
    As an example, this results in 'cannot be resolved' error in a
    generated Java Utility project
    (WebServicesProjectUtiltysales.types.core) in some Java class
    (com.mycompany.sales.types.core.BaseFilter) on import
    statements:
    
    import com.mycompany.sales.types.product.car.CarCriteriaFilter;
    import
    com.mycompany.sales.types.product.hotel.HotelCriteriaFilter;
    
    because the Java Build Path does not specify the generated Java
    Utilty projects (WebServicesProjectUtiltysales.types.product.car
    and WebServicesProjectUtiltysales.types.product.hotel) which
    contains the requested classes.
    
    The JAXB binding is failing to refer to the subtypes in the
    .java files, where the subtypes are part of different package
    than the package containing the base file.
    
    
    The generated code has the @XmlSeeAlso annotation that enables
    JAXB to bind additional Java classes.
    It introduces dependencies that Rational Application Developer
    8.0.3 web services tools did not detect which results in the
    missing dependencies.
    
    Defect background:
    This is a bug in Rational Application Developer 8.0.3 WS tools
    due to JAX-WS 2.1's introduction of the
    @XmlSeeAlso. Specifically, this feature affects the case where
    an XSD base type is extended. What this means is that if you
    define a schema type and then extend it in another type, the
    generated code for the base type will have an @XmlSeeAlso
    annotation that references all of the extended classes. As a
    result, the project containing the base type must reference the
    projects for the derived types and the derived types must
    reference the project for the base type (which they do today).
    It is the first part that Rational Application Developer does
    not do.
    
    However, addition of these dependencies results in circular
    references (= circular dependencies)
    , which are by default set in the workspace java preferences to
    be flagged as errors, which in turn prevents project Builds from
    completing.
    
    Local Fix:
    
    If you try to work-around the above errors by adding projects:
    
    WebServicesProjectUtiltysales.types.product.car and
    WebServicesProjectUtiltysales.types.product.hotel
    
    to the Java Build Path it will result in cyclical dependency
    errors.
    
    The recommended workaround is to
    use the 'Schema project' page of the JAX-WS Web Services wizard
    to manually configure circularly dependent project sets into a
    single project;  For example, the Schema files that are mapped
    to all of the Java utility projects should all be mapped to the
    some single Project 'X' , where X is a name of your choosing.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Build path dependency errors occur in Top Down JAX-WS
    generated web services with @XmlSeeAlso annotations when
    using the Generate Schema Library option.
    

Problem conclusion

  • When creating packages and project dependencies, the class
    references in the @XmlSeeAlso annotations must be analyzed.
    The fix for this APAR is included in Rational Application
    Developer v8.0.4.1.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM53011

  • Reported component name

    RATL APP DEV WI

  • Reported component ID

    5724J1901

  • Reported release

    803

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-11-28

  • Closed date

    2012-05-15

  • Last modified date

    2012-05-15

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    RATL APP DEV WI

  • Fixed component ID

    5724J1901

Applicable component levels

  • R803 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 May 2012